/**
 *
 */
package com.totyu.bpo.raffle.service;

import java.util.List;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.totyu.bpo.raffle.domain.User;
import com.totyu.bpo.raffle.repository.UserRepository;

/**
 * @author yuqy
 *
 */
@Component("userService")
@Transactional
public class UserServiceImpl implements UserService {
	private UserRepository userRepository;

	UserServiceImpl(UserRepository userRepository) {
		this.userRepository = userRepository;
	}

	@Override
	public List<User> findByEmpNameOrEmpCd(String empName, String empCd) {
		return userRepository.findByEmpNameOrEmpCd(empName, empCd);
	}

	@Override
	public int updateTicketCard(String ticketCard, Long id) {
		return userRepository.updateTicketCard(ticketCard, id);
	}

	@Override
	public List<User> list() {
		return userRepository.findAll();
	}

	@Override
	public int updateWinningNumbers(String winningNumbers, Long id) {
		return userRepository.updateWinningNumbers(winningNumbers, id);
	}

}
